package com.xcity.pomelo.response;

import com.xcity.db.entity.Player;
import com.xcity.game.assist.AssistBuild;
import com.xcity.game.assist.AssistInvite;
import com.xcity.game.buildv2.BuildV2;
import com.xcity.game.buildv2.BuildV2.State;
import com.xcity.pomelo.response.BuildV2Response.Assistant;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class AssistInviteResponse extends Response {

	private int buildid;
//	private long assTime;
	private int assLeftSec;
	private Assistant assistant;
	private State state;
	private int takeMoney;
	public AssistInviteResponse(int serial, AssistBuild assbuild, Player assPlayer, State state, long now, int lastTake) {
		super(serial);
		this.buildid = assbuild.getId();
//		this.assTime = now;
//		long endTime = now + BuildV2.BUILD_RETURN_MILLISECOND;
		this.assLeftSec = (int)((BuildV2.BUILD_RETURN_MILLISECOND) / 1000L);
 		this.assistant = new Assistant(assPlayer, assbuild);
		this.state = state;
		this.takeMoney = lastTake;
	}
	public int getBuildid() {
		return buildid;
	}
	public void setBuildid(int buildid) {
		this.buildid = buildid;
	}
	public int getAssLeftSec() {
		return assLeftSec;
	}
	public void setAssLeftSec(int assLeftSec) {
		this.assLeftSec = assLeftSec;
	}
	public Assistant getAssistant() {
		return assistant;
	}
	public void setAssistant(Assistant assistant) {
		this.assistant = assistant;
	}
	public State getState() {
		return state;
	}
	public void setState(State state) {
		this.state = state;
	}
	public int getTakeMoney() {
		return takeMoney;
	}
	public void setTakeMoney(int takeMoney) {
		this.takeMoney = takeMoney;
	}
}
